<{include file="public/header.html"}>
<p id="page-intro">Free Blog</p>
<br/><br/>
<div class="clear"></div> <!-- End .clear -->
<div class="content-box"><!-- Start Content Box -->
    <div class="content-box-header">
        <h3>数据管理</h3>
        <ul class="content-box-tabs">
            <li><a href="#tab1" class="default-tab">数据管理</a></li>
            <!-- href must be unique and match the id of target div -->
        </ul>
        <div class="clear"></div>
    </div> <!-- End .content-box-header -->

    <div class="content-box-content ">
        <div class="tab-content default-tab" id="tab1">
            <!-- This is the target div. id must match the href of this div's tab -->
            <table>
                <thead>
                <tr>
                    <td>
                        <!-- action='<{$url}>/importData' method='post' -->
                        <form action='<{$url}>/importData' method='post' enctype="multipart/form-data">
                            <input type='file' name='importData'/>&nbsp;&nbsp;&nbsp;
                            <!--<input type='submit' value='导入' class='button' />-->
                            <button class='button'>导入</button>
                        </form>
                    </td>
                    <td>

                    </td>
                    <!--判定用户是否存放数据表,如果不存放文件夹中将不存在数据表不显示该按钮-->
                    <{if $resultSaveData eq "1"}>
                    <td>
                        <button class='button' onclick='clearDbFile()'>清空上传数据文件</button>&nbsp;&nbsp;<span
                            id='uploadNum'>(<{$uploadNum}>)</span>
                        <script>
                            function clearDbFile() {
                                Ajax().post("<{$url}>/delDbFile", 'sureDel=1', function (data) {
                                    alert(data);
                                    var upload = document.getElementById('uploadNum');
                                    upload.innerHTML = "(0)";
                                })
                            }
                        </script>
                    </td>
                    <{/if}>
                </tr>
                <br/>
                <br/>
                <br/>
                </thead>
                <tfoot>
                </tfoot>
                <tbody>
                <{section name='loo' loop=$tableDeta}>
                <tr>
                    <td><{$tableDeta[loo].TABLE_NAME}></td>
                    <td><{$tableDeta[loo].TABLE_COMMENT}></td>
                    <td>
                        <a href='<{$url}>/saveTxt/TABLE_NAME/<{$tableDeta[loo].TABLE_NAME}>' title='导出到TXT'><img
                                src="<{$res}>/images/icons/detaCates.png" alt="导出到TXT"/></a>
                    </td>
                </tr>
                <{/section}>
                </tbody>
            </table>
        </div>
    </div> <!-- End .content-box-content -->
</div> <!-- End .content-box -->
<div class="clear"></div>
<!--页面底部-->
<{include file="public/foot.html"}>